<!DOCTYPE html>
<html lang="en">
<head>

    <!--http://www.tuicool.com/articles/Uz6fm2F-->
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">     <meta name="renderer" content="webkit|ie-comp|ie-stand" />
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0,user-scalable=no,minimum-scale=1.0, maximum-scale=1.0"/>
    <meta name="full-screen" content="true">
    <!-- 启用360浏览器的极速模式(webkit) -->
    <meta name="renderer" content="webkit">
    <!-- 避免IE使用兼容模式 -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">     <meta name="renderer" content="webkit|ie-comp|ie-stand" />
    <!-- 针对手持设备优化，主要是针对一些老的不识别viewport的浏览器，比如黑莓 -->
    <meta name="HandheldFriendly" content="true">
    <!-- 微软的老式浏览器 -->
    <meta name="MobileOptimized" content="320">
    <!-- uc强制竖屏 -->
    <meta name="screen-orientation" content="portrait">
    <!-- QQ强制竖屏 -->
    <meta name="x5-orientation" content="portrait">
    <!-- UC强制全屏 -->
    <meta name="full-screen" content="yes">
    <!-- QQ强制全屏 -->
    <meta name="x5-fullscreen" content="true">
    <!-- UC应用模式 -->
    <meta name="browsermode" content="application">
    <!-- QQ应用模式 -->
    <meta name="x5-page-mode" content="app">
    <!-- windows phone 点击无高光 -->
    <meta name="msapplication-tap-highlight" content="no">
    <meta name="screen-orientation" content="portrait">
    <meta name="x5-fullscreen" content="true">
    <meta http-equiv="pragma" content="no-cache">
    <!-- iphone会把一串数字识别为电话号码，点击的时候会提示是否呼叫，屏蔽这功能则把telephone设置为no -->
    <meta name="format-detection" content="telephone=no, email=no"/>
    <!--<link rel="stylesheet" href="//g.alicdn.com/sui/sui3/0.0.18/css/sui.min.css">-->
    <link rel="stylesheet" href="../../libs/sui.min.css">
    <link rel="stylesheet" href="print.css" media="print"/>
    <link rel="stylesheet" href="print.css"/>
    <style>
        body {
            background: #f6f6f6;
        }

        #print {
            width: 1100px;
            margin: 0 auto;
            min-height: 800px;
        }

        #print .panel-body {
            border: 1px solid #eee;
            margin-bottom: 10px;
            background: #FFF;
        }

        ul {
            list-style: none;
            margin: 0;
            padding: 0;
        }

        #contract {
            font-size: 18px;
        }
        .underline{
            border-bottom: 1px solid #808080;
            padding: 2px 5px;
        }

    </style>
    <title>提单打印</title>
</head>
<body class="sub-body">
<div id="print">
    <div class="panel-body">
        <a href="javascript:void(0);" class="btn btn-primary">打印</a>
    </div>
    <div class="panel-body">
        <div id="contract" style="width: 800px;margin:20px auto;">
            <h1 style="text-align: center;">上海海鹏化工科技有限公司提单</h1>
            <br>
            <p style="text-align: right">提单号：{{no}}</p>
            <p>{{storeCom}}：</p>
            <p>兹有我司委派 <span class="underline">{{delegate}}</span>  凭其有效提货凭证提取{{qualitySpec}}{{goodsName}} <span class="underline">{{number}}</span>吨，请发货为感。此提单为转货权，免仓至 <span class="underline">{{freeDate}}</span>，从 <span class="underline">{{freeDate1}}</span>起由其承担仓储费。</p>
            <p>提货仓库：{{storeName}}</p>
            <p class="text-center">商祺！</p>
            <p>备注：
            <div style="margin-left: 30px;">
            <div contenteditable="true" style="min-height: 50px;margin-bottom: 30px;"></div>
            </div>
            </p>
            <p>制单人：{{userName}} <span class="pull-right" style="float: right;">制单日期：{{createAt}}</span></p>
            <p>
                1、我司联系电话：021-60482075/60482076 <br>
                2、我司联系传真：021-54738880/64354655 <br>
                3、此单加盖我司合同专用章有效。
            </p>
        </div>
    </div>
</div>
</body>
<script language="javascript" src="./../../libs/dayin/jquery-1.4.4.min.js"></script>
<script language="javascript" src="./../../libs/dayin/jquery.jqprint-0.3.js"></script>
<script language="javascript" src="./../../libs/moment.min.js"></script>
<script type="text/javascript" src="./../../script/common.js"></script>
<script language="javascript">
    $(function () {
        var searchObj = parseSearch();
        $.get('/api/admin/ladingBill/print?id=' + searchObj.id+'&type='+searchObj.type, function (data) {
            var obj = data.data;
            var obj = obj.print;
            var contract = $('#contract').html();
            for (var key in obj) {
                if (obj[key] != null)
                    contract = contract.replace('{{' + key + '}}', obj[key])
            }
            contract = contract.replace('{{createAt}}', moment(new Date()).format('YYYY年MM月DD日'))
            $('#contract').html(contract);
        });
        $('.btn').click(function () {
            $('#contract').jqprint();
        });
    })
</script>
</html>